import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsOptional, IsHexColor, Length } from 'class-validator';

/**
 * 更新标签DTO
 */
export class UpdateTagDto {
  @ApiProperty({
    description: '标签名称',
    example: '紧急',
    required: false,
  })
  @IsString()
  @IsOptional()
  @Length(1, 50)
  name?: string;

  @ApiProperty({
    description: '标签颜色（十六进制）',
    example: '#FF0000',
    required: false,
  })
  @IsString()
  @IsHexColor()
  @IsOptional()
  color?: string;
} 